updating oE clear

clear

include map.e 
namespace map 
public procedure clear(map the_map_p) 

removes all entries in a map.

Parameters:
  1. the_map_p : the map to operate on
Comments:
  • This is much faster than removing each entry individually.
  • If you need to remove just one entry, see remove
Example 1:
map the_map_p 
the_map_p = new() 
put(the_map_p, "Amy", 66.9) 
put(the_map_p, "Betty", 67.8) 
put(the_map_p, "Claire", 64.1) 
... 
clear(the_map_p) 
-- the_map_p is now an empty map again 
See Also:

remove, has

Not Categorized, Please Help

Search



Quick Links

User menu

Not signed in.

Misc Menu